package com.zy.cat.entity.game;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.CatDevGameCVSDrawCountHistoryPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫神奇便利店，每日抽奖次数获取记录
 * @author Link
 * @date 2019-10-30 09:14
 */
@Entity
@Table(name = "zy_cat_game_cvs_draw_count_history", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "dtype", columnList = "dtype"),
		@Index(name = "ltime", columnList = "ltime"),
		@Index(name = "ctime", columnList = "ctime") })
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("9趣猫神奇便利店，每日抽奖次数获取记录")
@IdClass(CatDevGameCVSDrawCountHistoryPrimary.class)
public class CVSDrawCountHistory {

	@Id
	@Column(columnDefinition = "VARCHAR(10) NOT NULL  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22")
	private String ctime;
	
	@Id
	@Column(columnDefinition = "VARCHAR(20) NOT NULL COMMENT '用户账号ID[9趣猫神奇便利店，每日抽奖次数获取记录]'")
	@ApiModelProperty(value = "用户账号ID", example = "fe53d6a4fa29641")
	private String pid;
	
	@Id
	@Column(columnDefinition = "INT(2) NOT NULL COMMENT '类型（-1.消耗、1.奖励）'")
	@ApiModelProperty(value = "类型（-1.消耗、1.奖励）", example = "1")
	private int dtype;
	
	@Column(columnDefinition = "INT(2) DEFAULT '6' COMMENT '数量'")
	@ApiModelProperty(value = "数量", example = "6")
	private int dcount;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更新时间'")
	@ApiModelProperty(value = "最后更新时间", example = "2019-02-22 10:10:10")
	private String ltime;
	
	public CVSDrawCountHistory(String pid) {
		this.pid=pid;
	}

}
